package com.langerra.client.channel.rpc;

import java.io.Serializable;
import java.util.ArrayList;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.langerra.shared.channel.ChannelMessage;

public interface RemoteChannelServiceAsync {
	<T extends Serializable> void get(
			String channelName, Long key, AsyncCallback<ChannelMessage<T>> callback);

	<T extends Serializable> void put(
			String channelName, ChannelMessage<T> value, AsyncCallback<ChannelMessage<T>> callback);

	<T extends Serializable> void writeAll(
			String channelName, ArrayList<ChannelMessage<T>> messages, AsyncCallback<Boolean> callback);

	<T extends Serializable> void readAll(
			String channelName, AsyncCallback<ArrayList<ChannelMessage<T>>> callback);
}